<!DOCTYPE html>
<script>
    if (window.testRunner) {
        testRunner.waitUntilDone();
        testRunner.dumpAsText();
    }

    function check() {
        var expected = 20;
        var actual = document.querySelector("img").offsetHeight;
        var out = document.querySelector("pre");
        if (actual == expected)
            out.textContent = "PASS";
        else
            out.textContent = "FAIL: image height was " + actual + " expected " + expected;
        testRunner.notifyDone();
    }
</script>
<div>
    Tests that an image with height 100% inside a floated div keeps its intrinsic height.<br/>
    See Bug: http://bugs.webkit.org/show_bug.cgi?id=45439</div>
<div style="float: left;">
    <!-- src is a 20 x 20 PNG -->
    <img style="height: 100%; width: 100%;" onload="check()" src=""/>
</div>
<pre></pre>